package com.feign.service;

import com.feign.entity.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 指定服务名，绑定服务
 * */
@FeignClient(value = "provider-server",fallback = HelloServiceFallback.class)
public interface HelloService {

    @RequestMapping(value = "/",method = RequestMethod.GET)
    String hello();

    @RequestMapping(value = "/xm",method = RequestMethod.GET)
    String say(@RequestParam("name") String name, @RequestParam("content") String content);

    @RequestMapping(value = "/user",method = RequestMethod.GET)
    String helloUser(@RequestBody User user);

}
